export const routes = [
    {
        path:'/login',
        component:()=>import('@/views/login/index.vue'),
        name:'login',
        meta:{
            title:'登录',
            isShow:false,
        }
    },
    {
        path:'/',
        component:()=>import('@/layout/index.vue'),
        name:'home',
        meta:{
            isShow:true,
            title:'首页'
        },
        //重定向
        redirect:'/home',
        children:[
            {
                path:'/home',
                component:()=>import('@/views/home/index.vue'),
                
                meta:{
                    title:'首页',
                    isShow:true,
                    icon:"House"
                }
            }
        ]
    },
    //404路由
    {
        path: '/404',
        component:()=>import('@/views/404/index.vue'),
        meta:{
            isShow:false,
            title:'404'
        }
    },


]
//异步路由
export const asyncRoutes = [
    {
        path:'/Deapartment',
        component:()=>import('@/layout/index.vue'),
        name:'Deapartment',
        meta:{
            isShow:true,
            title:'科室管理'
        },
        redirect:'/Deapartment/add',
        children:[
            {
                path:'/Deapartment/add',
                component:()=>import('@/views/Deapartment/index.vue'),
                meta:{
                    title:'添加科室',
                    isShow:true,
                    icon:"DocumentAdd"
                }
            }
        ]
    },
    //身份证路由
    {
        path:'/idcard',
        component:()=>import('@/layout/index.vue'),
        name:'Idcard',
        meta:{
            title:'身份证审核',
            isShow:true,
        },
        redirect:'/idcard/people',
        children:[
            {
                path:'/idcard/people',
                component:()=>import('@/views/PeoPel/index.vue'),
                meta:{
                    isShow:true,
                    icon:"User"
                }
            }
        ]
    },
    //职位与权限管理
    {
        path:'/authority',
        component:()=>import('@/layout/index.vue'),
        meta:{
            title:'职位与菜单管理',
            isShow:true,
            icon:"Setting"
        },
        name:'jobAndMenuManger' ,
        redirect:'/authority/job',
        children:[
            {
                path:'/authority/job',
                component:()=>import('@/views/job/index.vue'),
                meta:{
                    title:'职位管理',
                    isShow:true,
                    icon:"Avatar"
                },
                name:'jobManger'
            },
            {
                path:'/authority/menus',
                component:()=>import('@/views/roles/index.vue'),
                meta:{
                    title:'菜单管理',
                    isShow:true,
                    icon:"Grid"
                },
                name:'menuManger'
            }
        ]
    },
    //医生管理
    {
        path:'/doctor',
        component:()=>import('@/layout/index.vue'),
        meta:{
            title:'医生管理',
            isShow:true,
        },
        name:'doctorManger' ,
        children:[
            {
                path:'',
                name:'doctor',
                component:()=>import('@/views/Doctor/index.vue'),
                meta:{
                    
                    isShow:true,
                    icon:'Management'
                },
            }
        ]
    },
    //排班管理
    {
        path:'/Scheduling',
        component:()=>import('@/layout/index.vue'),
        meta:{
            title:'排班管理',
            isShow:true,
        },
        name:'SchedulingManger' ,
        children:[
            {
                path:'',
                name:'Scheduling',
                component:()=>import('@/views/Scheduling/index.vue'),
                meta:{
                    isShow:true,
                    icon:'Memo'
                },
            }
        ]
    },
     //公告管理
     {
        path:'/Notice',
        component:()=>import('@/layout/index.vue'),
        meta:{
            title:'公告管理',
            isShow:true,
        },
        name:'NoticeManger' ,
        children:[
            {
                path:'',
                name:'Notice',
                component:()=>import('@/views/Notice/index.vue'),
                meta:{
                    isShow:true,
                    icon:'Document'
                },
            }
        ]
    },
     //订单管理
     {
        path:'/Order',
        component:()=>import('@/layout/index.vue'),
        meta:{
            title:'订单管理',
            isShow:true,
        },
        name:'OrderManger' ,
        children:[
            {
                path:'',
                name:'Order',
                component:()=>import('@/views/Order/index.vue'),
                meta:{
                    isShow:true,
                    icon:'Tickets'
                },
            }
        ]
    },
     //轮播图管理
     {
        path:'/Banner',
        component:()=>import('@/layout/index.vue'),
        meta:{
            title:'轮播图管理',
            isShow:true,
        },
        name:'BannerManger' ,
        children:[
            {
                path:'',
                name:'Banner',
                component:()=>import('@/views/Banner/index.vue'),
                meta:{
                    isShow:true,
                    icon:'PictureFilled'
                },
            }
        ]
    }
]
//任意路由
export const anyRouter = [
    //重定向路由，当路径不是上面三个路由时，重新定向路由到404这个路由
    {
      path: "/:pathMacth(.*)*",
      redirect: "/404",
      name: "any",
      meta: {
        title: "任意路由",
        isShow: false,
        icon: "Message",
      },
    },
  ];